package com.newlink.building.main.mvp.presenter

import com.newlink.building.common_base.base.BasePresenter
import com.newlink.building.common_base.ext.ss
import com.newlink.building.main.mvp.contract.Module_Main_RoomUserContract
import com.newlink.building.main.mvp.model.Module_Main_RoomUserModel

/**
 * @Author: Jake
 * @Date: 2024-10-15
 * @Description:
 */
class Module_Main_RoomUserPresenter : BasePresenter<Module_Main_RoomUserContract.Model, Module_Main_RoomUserContract.View>(),
    Module_Main_RoomUserContract.Presenter {

    override fun createModel(): Module_Main_RoomUserContract.Model = Module_Main_RoomUserModel()

    override fun getRoomUserList(token: String, roomId: String, name: String) {
        mModel?.getRoomUserList(token, roomId, name)?.ss(mModel, mView) {
            it?.data?.let { data ->
                mView?.getRoomUserListSuccess(data)
            }
        }
    }
}